package com.example.cloudservicea.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.cloudservicea.dao.IUserDao;
import com.example.cloudservicea.pojo.User;
import com.example.cloudservicea.service.IUserService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;

@Slf4j
@Service
@RocketMQMessageListener(consumerGroup = "group1",topic ="order-topic")
public class UserServiceImpl  extends ServiceImpl<IUserDao, User> implements IUserService , RocketMQListener<String> {

    /**
     * mq监听方法
     * @param
     */
    @Override
    public void onMessage(String message) {
        log.info("收到order-topic的来信，信的内容是[{}]",message);
    }
}
